/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package systole.domain.analysis.results.averages;

import java.io.Serializable;

/**
 *
 * @author jmj
 */
public abstract class AverageByDecade implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 3623829138434871773L;
    private Integer id;
    private int decade;
    private int samples;
    private Average averageIAR;
    private Average averageAOD;
    private Average averageAOS;

    /**
     * 
     */
    public AverageByDecade() {
        super();
    }

    /**
     * @param decade
     */
    public AverageByDecade(int decade) {
        this.decade = decade;
        this.samples = 0;
        this.averageAOD = new Average();
        this.averageAOS = new Average();
        this.averageIAR = new Average();
    }

    /**
     * @return the id
     */
    public Integer getId() {
        return this.id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * @return the decade
     */
    public int getDecade() {
        return this.decade;
    }

    /**
     * @param decade the decade to set
     */
    public void setDecade(int decade) {
        this.decade = decade;
    }

    /**
     * @return the samples
     */
    public int getSamples() {
        return this.samples;
    }

    /**
     * @param samples the samples to set
     */
    public void setSamples(int samples) {
        this.samples = samples;
    }

    /**
     * @return the averageIAR
     */
    public Average getAverageIAR() {
        return this.averageIAR;
    }

    /**
     * @param averageIAR the averageIAR to set
     */
    public void setAverageIAR(Average averageIAR) {
        this.averageIAR = averageIAR;
    }

    /**
     * @return the averageAOD
     */
    public Average getAverageAOD() {
        return this.averageAOD;
    }

    /**
     * @param averageAOD the averageAOD to set
     */
    public void setAverageAOD(Average averageAOD) {
        this.averageAOD = averageAOD;
    }

    /**
     * @return the averageAOS
     */
    public Average getAverageAOS() {
        return this.averageAOS;
    }

    /**
     * @param averageAOS the averageAOS to set
     */
    public void setAverageAOS(Average averageAOS) {
        this.averageAOS = averageAOS;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final AverageByDecade other = (AverageByDecade) obj;
        if (this.decade != other.decade) {
            return false;
        }
        if (this.samples != other.samples) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 47 * hash + this.decade;
        hash = 47 * hash + this.samples;
        return hash;
    }
}
